<template>
  <div class="details">
    <div class="details-title flex items-center" @click="isShow = !isShow">
      <el-icon class="mr-8px"><ArrowDown /></el-icon>系统信息
    </div>
    <div class="details-content flex flex-wrap" v-if="isShow">
      <div class="w-50% flex mb-18px">
        <div class="label">负责人</div>
        <div class="content">{{ clueValue.ownerUserName }}</div>
      </div>
      <div class="w-50% flex mb-18px">
        <div class="label">创建人</div>
        <div class="content">{{ clueValue.creatorName }}</div>
      </div>
      <div class="w-50% flex mb-18px">
        <div class="label">最后跟进时间</div>
        <div class="content"> {{ formatDate(clueValue.contactLastTime) }}</div>
      </div>
      <div class="w-50% flex mb-18px">
        <div class="label">最后跟进记录</div>
        <div class="content">{{ clueValue.contactLastContent }}</div>
      </div>
      <div class="w-50% flex mb-18px">
        <div class="label">创建时间</div>
        <div class="content"> {{ formatDate(clueValue.createTime) }}</div>
      </div>
      <div class="w-50% flex mb-18px">
        <div class="label">更新时间</div>
        <div class="content"> {{ formatDate(clueValue.updateTime) }}</div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ArrowDown } from '@element-plus/icons-vue'
import { DICT_TYPE } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
const isShow = ref(true)
const props = defineProps({
  clueValue: Object
})
</script>

<style lang="scss" scoped>
.details {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #172b4d1a;
  margin: 0 8px;
  .details-title {
    font-size: 14px;
    color: #172b4d;
    cursor: pointer;
    padding: 16px;
  }
}
.label {
  width: 88px;
  line-height: 32px;
  text-overflow: ellipsis;
  text-align: right;
  color: #42526e;
  font-size: 14px;
  padding-right: 12px;
}
.content {
  width: calc(100% - 126px);
  margin-right: 12px;
  padding: 0 6px;
  min-height: 32px;
  line-height: 32px;
  color: #172b4d;
  font-size: 14px;
  background-color: #ebecf0;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  overflow-wrap: break-word;
}
.shark {
  flex-shrink: 0;
}
</style>
